function GAD_mobility(Data_Summary)
% This function outputs a mobility.xlsx file to use in prism graphing

%% get all basic info to put into a summary table ready
animalNames = {'G2_F4_18'; 'G2_F5(2)_28'; 'G2_F5(2)_31'; 'G2_F5(2)_34'; 'G2_F6(2)_42'; 'G2_F4_17'; 'G2_F5(2)_21'; 'G2_F5(2)_45'; 'G2_F5(2)_53'; 'G2_F6(2)_36'};
genotype = {'a5-i-WT'; 'a5-i-WT'; 'a5-i-WT'; 'a5-i-WT'; 'a5-i-WT'; 'a5-i-KO'; 'a5-i-KO'; 'a5-i-KO'; 'a5-i-KO'; 'a5-i-KO'};

%% collect saline data
[G18_saline_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'saline');
[G28_saline_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'saline');
[G31_saline_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'saline');
[G34_saline_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'saline');
[G42_saline_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'saline');
[G17_saline_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'saline');
[G21_saline_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'saline');
[G45_saline_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'saline');
[G53_saline_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'saline');
[G36_saline_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'saline');

% concatenate results
saline = cat(1, G18_saline_M, G28_saline_M, G31_saline_M, G34_saline_M, G42_saline_M,...
    G17_saline_M, G21_saline_M, G45_saline_M, G53_saline_M, G36_saline_M);

%% collect altered_contexts data
[G18_altered_contexts_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'altered contexts');
[G28_altered_contexts_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'altered contexts');
[G31_altered_contexts_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'altered contexts');
[G34_altered_contexts_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'altered contexts');
[G42_altered_contexts_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'altered contexts');
[G17_altered_contexts_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'altered contexts');
[G21_altered_contexts_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'altered contexts');
[G45_altered_contexts_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'altered contexts');
[G53_altered_contexts_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'altered contexts');
[G36_altered_contexts_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'altered contexts');

% concatenate results
altered_contexts = cat(1, G18_altered_contexts_M, G28_altered_contexts_M, G31_altered_contexts_M, G34_altered_contexts_M, G42_altered_contexts_M,...
    G17_altered_contexts_M, G21_altered_contexts_M, G45_altered_contexts_M, G53_altered_contexts_M, G36_altered_contexts_M);

%% collect etom2 data
[G18_etom2_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'etomidate 2mg/kg');
[G28_etom2_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'etomidate 2mg/kg');
[G31_etom2_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'etomidate 2mg/kg');
[G34_etom2_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'etomidate 2mg/kg');
[G42_etom2_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'etomidate 2mg/kg');
[G17_etom2_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'etomidate 2mg/kg');
[G21_etom2_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'etomidate 2mg/kg');
[G45_etom2_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'etomidate 2mg/kg');
[G53_etom2_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'etomidate 2mg/kg');
[G36_etom2_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'etomidate 2mg/kg');

% concatenate results
etom2 = cat(1, G18_etom2_M, G28_etom2_M, G31_etom2_M, G34_etom2_M, G42_etom2_M,...
    G17_etom2_M, G21_etom2_M, G45_etom2_M, G53_etom2_M, G36_etom2_M);

%% collect etom4 data
[G18_etom4_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'etomidate 4mg/kg');
[G28_etom4_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'etomidate 4mg/kg');
[G31_etom4_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'etomidate 4mg/kg');
[G34_etom4_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'etomidate 4mg/kg');
[G42_etom4_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'etomidate 4mg/kg');
[G17_etom4_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'etomidate 4mg/kg');
[G21_etom4_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'etomidate 4mg/kg');
[G45_etom4_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'etomidate 4mg/kg');
[G53_etom4_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'etomidate 4mg/kg');
[G36_etom4_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'etomidate 4mg/kg');

% concatenate results
etom4 = cat(1, G18_etom4_M, G28_etom4_M, G31_etom4_M, G34_etom4_M, G42_etom4_M,...
    G17_etom4_M, G21_etom4_M, G45_etom4_M, G53_etom4_M, G36_etom4_M);

%% collect etom6 data
[G18_etom6_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'etomidate 6mg/kg');
[G28_etom6_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'etomidate 6mg/kg');
[G31_etom6_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'etomidate 6mg/kg');
[G34_etom6_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'etomidate 6mg/kg');
[G42_etom6_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'etomidate 6mg/kg');
[G17_etom6_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'etomidate 6mg/kg');
[G21_etom6_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'etomidate 6mg/kg');
[G45_etom6_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'etomidate 6mg/kg');
[G53_etom6_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'etomidate 6mg/kg');
[G36_etom6_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'etomidate 6mg/kg');

% concatenate results
etom6 = cat(1, G18_etom6_M, G28_etom6_M, G31_etom6_M, G34_etom6_M, G42_etom6_M,...
    G17_etom6_M, G21_etom6_M, G45_etom6_M, G53_etom6_M, G36_etom6_M);

%% collect etom7 data
[G18_etom7_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'etomidate 7mg/kg');
[G28_etom7_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'etomidate 7mg/kg');
[G31_etom7_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'etomidate 7mg/kg');
[G34_etom7_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'etomidate 7mg/kg');
[G42_etom7_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'etomidate 7mg/kg');
[G17_etom7_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'etomidate 7mg/kg');
[G21_etom7_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'etomidate 7mg/kg');
[G45_etom7_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'etomidate 7mg/kg');
[G53_etom7_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'etomidate 7mg/kg');
[G36_etom7_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'etomidate 7mg/kg');

% concatenate results
etom7 = cat(1, G18_etom7_M, G28_etom7_M, G31_etom7_M, G34_etom7_M, G42_etom7_M,...
    G17_etom7_M, G21_etom7_M, G45_etom7_M, G53_etom7_M, G36_etom7_M);

%% collect etom8 data
[G18_etom8_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'etomidate 8mg/kg');
[G28_etom8_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'etomidate 8mg/kg');
[G31_etom8_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'etomidate 8mg/kg');
[G34_etom8_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'etomidate 8mg/kg');
[G42_etom8_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'etomidate 8mg/kg');
[G17_etom8_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'etomidate 8mg/kg');
[G21_etom8_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'etomidate 8mg/kg');
[G45_etom8_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'etomidate 8mg/kg');
[G53_etom8_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'etomidate 8mg/kg');
[G36_etom8_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'etomidate 8mg/kg');

% concatenate results
etom8 = cat(1, G18_etom8_M, G28_etom8_M, G31_etom8_M, G34_etom8_M, G42_etom8_M,...
    G17_etom8_M, G21_etom8_M, G45_etom8_M, G53_etom8_M, G36_etom8_M);

%% collect mid025 data
[G18_mid025_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'midazolam 0.25mg/kg');
[G28_mid025_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'midazolam 0.25mg/kg');
[G31_mid025_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'midazolam 0.25mg/kg');
[G34_mid025_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'midazolam 0.25mg/kg');
[G42_mid025_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'midazolam 0.25mg/kg');
[G17_mid025_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'midazolam 0.25mg/kg');
[G21_mid025_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'midazolam 0.25mg/kg');
[G45_mid025_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'midazolam 0.25mg/kg');
[G53_mid025_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'midazolam 0.25mg/kg');
[G36_mid025_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'midazolam 0.25mg/kg');

% concatenate results
mid025 = cat(1, G18_mid025_M, G28_mid025_M, G31_mid025_M, G34_mid025_M, G42_mid025_M,...
    G17_mid025_M, G21_mid025_M, G45_mid025_M, G53_mid025_M, G36_mid025_M);

%% collect mid075 data
[G18_mid075_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'midazolam 0.75mg/kg');
[G28_mid075_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'midazolam 0.75mg/kg');
[G31_mid075_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'midazolam 0.75mg/kg');
[G34_mid075_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'midazolam 0.75mg/kg');
[G42_mid075_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'midazolam 0.75mg/kg');
[G17_mid075_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'midazolam 0.75mg/kg');
[G21_mid075_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'midazolam 0.75mg/kg');
[G45_mid075_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'midazolam 0.75mg/kg');
[G53_mid075_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'midazolam 0.75mg/kg');
[G36_mid075_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'midazolam 0.75mg/kg');

% concatenate results
mid075 = cat(1, G18_mid075_M, G28_mid075_M, G31_mid075_M, G34_mid075_M, G42_mid075_M,...
    G17_mid075_M, G21_mid075_M, G45_mid075_M, G53_mid075_M, G36_mid075_M);

%% collect mid125 data
[G18_mid125_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'midazolam 1.25mg/kg');
[G28_mid125_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'midazolam 1.25mg/kg');
[G31_mid125_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'midazolam 1.25mg/kg');
[G34_mid125_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'midazolam 1.25mg/kg');
[G42_mid125_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'midazolam 1.25mg/kg');
[G17_mid125_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'midazolam 1.25mg/kg');
[G21_mid125_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'midazolam 1.25mg/kg');
[G45_mid125_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'midazolam 1.25mg/kg');
[G53_mid125_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'midazolam 1.25mg/kg');
[G36_mid125_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'midazolam 1.25mg/kg');

% concatenate results
mid125 = cat(1, G18_mid125_M, G28_mid125_M, G31_mid125_M, G34_mid125_M, G42_mid125_M,...
    G17_mid125_M, G21_mid125_M, G45_mid125_M, G53_mid125_M, G36_mid125_M);

%% collect mid25 data
[G18_mid25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'midazolam 2.5mg/kg');
[G28_mid25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'midazolam 2.5mg/kg');
[G31_mid25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'midazolam 2.5mg/kg');
[G34_mid25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'midazolam 2.5mg/kg');
[G42_mid25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'midazolam 2.5mg/kg');
[G17_mid25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'midazolam 2.5mg/kg');
[G21_mid25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'midazolam 2.5mg/kg');
[G45_mid25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'midazolam 2.5mg/kg');
[G53_mid25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'midazolam 2.5mg/kg');
[G36_mid25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'midazolam 2.5mg/kg');

% concatenate results
mid25 = cat(1, G18_mid25_M, G28_mid25_M, G31_mid25_M, G34_mid25_M, G42_mid25_M,...
    G17_mid25_M, G21_mid25_M, G45_mid25_M, G53_mid25_M, G36_mid25_M);

%% collect prop50 data
[G18_prop50_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'propofol 50mg/kg');
[G28_prop50_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'propofol 50mg/kg');
[G31_prop50_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'propofol 50mg/kg');
[G34_prop50_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'propofol 50mg/kg');
[G42_prop50_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'propofol 50mg/kg');
[G17_prop50_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'propofol 50mg/kg');
[G21_prop50_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'propofol 50mg/kg');
[G45_prop50_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'propofol 50mg/kg');
[G53_prop50_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'propofol 50mg/kg');
[G36_prop50_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'propofol 50mg/kg');

% concatenate results
prop50 = cat(1, G18_prop50_M, G28_prop50_M, G31_prop50_M, G34_prop50_M, G42_prop50_M,...
    G17_prop50_M, G21_prop50_M, G45_prop50_M, G53_prop50_M, G36_prop50_M);

%% collect prop75 data
[G18_prop75_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'propofol 75mg/kg');
[G28_prop75_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'propofol 75mg/kg');
[G31_prop75_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'propofol 75mg/kg');
[G34_prop75_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'propofol 75mg/kg');
[G42_prop75_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'propofol 75mg/kg');
[G17_prop75_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'propofol 75mg/kg');
[G21_prop75_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'propofol 75mg/kg');
[G45_prop75_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'propofol 75mg/kg');
[G53_prop75_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'propofol 75mg/kg');
[G36_prop75_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'propofol 75mg/kg');

% concatenate results
prop75 = cat(1, G18_prop75_M, G28_prop75_M, G31_prop75_M, G34_prop75_M, G42_prop75_M,...
    G17_prop75_M, G21_prop75_M, G45_prop75_M, G53_prop75_M, G36_prop75_M);

%% collect mp1 data
[G18_mp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'MP-III 1mg/kg');
[G28_mp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'MP-III 1mg/kg');
[G31_mp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'MP-III 1mg/kg');
[G34_mp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'MP-III 1mg/kg');
[G42_mp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'MP-III 1mg/kg');
[G17_mp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'MP-III 1mg/kg');
[G21_mp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'MP-III 1mg/kg');
[G45_mp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'MP-III 1mg/kg');
[G53_mp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'MP-III 1mg/kg');
[G36_mp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'MP-III 1mg/kg');

% concatenate results
mp1 = cat(1, G18_mp1_M, G28_mp1_M, G31_mp1_M, G34_mp1_M, G42_mp1_M,...
    G17_mp1_M, G21_mp1_M, G45_mp1_M, G53_mp1_M, G36_mp1_M);

%% collect mp3 data
[G18_mp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'MP-III 3mg/kg');
[G28_mp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'MP-III 3mg/kg');
[G31_mp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'MP-III 3mg/kg');
[G34_mp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'MP-III 3mg/kg');
[G42_mp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'MP-III 3mg/kg');
[G17_mp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'MP-III 3mg/kg');
[G21_mp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'MP-III 3mg/kg');
[G45_mp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'MP-III 3mg/kg');
[G53_mp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'MP-III 3mg/kg');
[G36_mp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'MP-III 3mg/kg');

% concatenate results
mp3 = cat(1, G18_mp3_M, G28_mp3_M, G31_mp3_M, G34_mp3_M, G42_mp3_M,...
    G17_mp3_M, G21_mp3_M, G45_mp3_M, G53_mp3_M, G36_mp3_M);

%% collect kseb25 data
[G18_kseb25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'KSEB 2.5mg/kg');
[G28_kseb25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'KSEB 2.5mg/kg');
[G31_kseb25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'KSEB 2.5mg/kg');
[G34_kseb25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'KSEB 2.5mg/kg');
[G42_kseb25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'KSEB 2.5mg/kg');
[G17_kseb25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'KSEB 2.5mg/kg');
[G21_kseb25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'KSEB 2.5mg/kg');
[G45_kseb25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'KSEB 2.5mg/kg');
[G53_kseb25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'KSEB 2.5mg/kg');
[G36_kseb25_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'KSEB 2.5mg/kg');

% concatenate results
kseb25 = cat(1, G18_kseb25_M, G28_kseb25_M, G31_kseb25_M, G34_kseb25_M, G42_kseb25_M,...
    G17_kseb25_M, G21_kseb25_M, G45_kseb25_M, G53_kseb25_M, G36_kseb25_M);

%% collect kseb5 data
[G18_kseb5_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', 'KSEB 5mg/kg');
[G28_kseb5_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', 'KSEB 5mg/kg');
[G31_kseb5_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', 'KSEB 5mg/kg');
[G34_kseb5_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', 'KSEB 5mg/kg');
[G42_kseb5_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', 'KSEB 5mg/kg');
[G17_kseb5_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', 'KSEB 5mg/kg');
[G21_kseb5_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', 'KSEB 5mg/kg');
[G45_kseb5_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', 'KSEB 5mg/kg');
[G53_kseb5_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', 'KSEB 5mg/kg');
[G36_kseb5_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', 'KSEB 5mg/kg');

% concatenate results
kseb5 = cat(1, G18_kseb5_M, G28_kseb5_M, G31_kseb5_M, G34_kseb5_M, G42_kseb5_M,...
    G17_kseb5_M, G21_kseb5_M, G45_kseb5_M, G53_kseb5_M, G36_kseb5_M);

%% collect cpp1 data
[G18_cpp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', '(R)-CPP 1mg/kg');
[G28_cpp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', '(R)-CPP 1mg/kg');
[G31_cpp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', '(R)-CPP 1mg/kg');
[G34_cpp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', '(R)-CPP 1mg/kg');
[G42_cpp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', '(R)-CPP 1mg/kg');
[G17_cpp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', '(R)-CPP 1mg/kg');
[G21_cpp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', '(R)-CPP 1mg/kg');
[G45_cpp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', '(R)-CPP 1mg/kg');
[G53_cpp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', '(R)-CPP 1mg/kg');
[G36_cpp1_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', '(R)-CPP 1mg/kg');

% concatenate results
cpp1 = cat(1, G18_cpp1_M, G28_cpp1_M, G31_cpp1_M, G34_cpp1_M, G42_cpp1_M,...
    G17_cpp1_M, G21_cpp1_M, G45_cpp1_M, G53_cpp1_M, G36_cpp1_M);

%% collect cpp3 data
[G18_cpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', '(R)-CPP 3mg/kg');
[G28_cpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', '(R)-CPP 3mg/kg');
[G31_cpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', '(R)-CPP 3mg/kg');
[G34_cpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', '(R)-CPP 3mg/kg');
[G42_cpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', '(R)-CPP 3mg/kg');
[G17_cpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', '(R)-CPP 3mg/kg');
[G21_cpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', '(R)-CPP 3mg/kg');
[G45_cpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', '(R)-CPP 3mg/kg');
[G53_cpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', '(R)-CPP 3mg/kg');
[G36_cpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', '(R)-CPP 3mg/kg');

% concatenate results
cpp3 = cat(1, G18_cpp3_M, G28_cpp3_M, G31_cpp3_M, G34_cpp3_M, G42_cpp3_M,...
    G17_cpp3_M, G21_cpp3_M, G45_cpp3_M, G53_cpp3_M, G36_cpp3_M);

%% collect rscpp3 data
[G18_rscpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_18', '(R,S)-CPP 3mg/kg');
[G28_rscpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_28', '(R,S)-CPP 3mg/kg');
[G31_rscpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_31', '(R,S)-CPP 3mg/kg');
[G34_rscpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_34', '(R,S)-CPP 3mg/kg');
[G42_rscpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_42', '(R,S)-CPP 3mg/kg');
[G17_rscpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F4_17', '(R,S)-CPP 3mg/kg');
[G21_rscpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_21', '(R,S)-CPP 3mg/kg');
[G45_rscpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_45', '(R,S)-CPP 3mg/kg');
[G53_rscpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F5(2)_53', '(R,S)-CPP 3mg/kg');
[G36_rscpp3_M] = Mobility_Mean_Prism(Data_Summary, 'G2_F6(2)_36', '(R,S)-CPP 3mg/kg');

% concatenate results
rscpp3 = cat(1, G18_rscpp3_M, G28_rscpp3_M, G31_rscpp3_M, G34_rscpp3_M, G42_rscpp3_M,...
    G17_rscpp3_M, G21_rscpp3_M, G45_rscpp3_M, G53_rscpp3_M, G36_rscpp3_M);

%% Now, make summary table

Mobility_Summary_Table = table(animalNames, genotype, saline, altered_contexts, etom2, etom4, etom6, ...
    etom7, etom8, mid025, mid075, mid125, mid25, prop50, prop75, mp1, mp3, kseb25, ...
    kseb5, cpp1, cpp3, rscpp3);

%% Export table

[ds, ~] = getdsap;
path = fullfile(ds.metadataPath, 'Prism excel data', 'Mobility.xlsx');

if ~exist((fullfile(ds.metadataPath, 'Prism excel data')), 'dir')
    mkdir(fullfile(ds.metadataPath, 'Prism excel data'));
end
writetable(Mobility_Summary_Table, path);

end